package com.yjt.common.vo;

import com.yjt.common.entity.oauth.CommonUser;
import lombok.Getter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * @author 曾智平
 * @ClassName: UserDetailVO
 * @Description: 用户验证信息详情
 * @date 2021/7/7 14:50
 */
public class UserDetailVO extends User {
    @Getter
    private CommonUser commonUser;

    public UserDetailVO(CommonUser commonUser, Collection<? extends GrantedAuthority> authorities) {
        super(commonUser.getEmplyName(), commonUser.getPwd(), authorities);
        commonUser.setPwd(null);
        this.commonUser = commonUser;
    }
}
